import Vue from 'vue'
// 直接将Vue组件作为Vue.extend的参数
import videoPreview from "./videoPreview";

const showVideoPreview = (url) => {
    const choiceTreeConstructor = Vue.extend(videoPreview);
    const instance = new choiceTreeConstructor({
        el: document.createElement("div")
    });

    document.querySelector("body").appendChild(instance.$el);
    return instance.show(url);
}

export default showVideoPreview;